package com.gmadmin.entity.vo.auth;

import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * @author zhangliang
 * @version 1.0
 * @date 2021/12/13 19:37
 */
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public class JwtResponse {
    /**
     * token 字段
     */
    @ApiModelProperty(value = "token值", required = true)
    private String token;

    /**
     * token类型
     */
    @ApiModelProperty(value = "token类型", required = true)
    private String tokenType = "Bearer";

    @ApiModelProperty(value = "刷新token")
    private String refreshToken;

    @ApiModelProperty(value = "过期时间")
    private Long expiration;


    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public String getTokenType() {
        return tokenType;
    }

    public JwtResponse(String token,Long expiration) {
        this.token = token;
        this.expiration=expiration;
    }

    public String getRefreshToken() {
        return refreshToken;
    }

    public void setRefreshToken(String refreshToken) {
        this.refreshToken = refreshToken;
    }

    public Long getExpiration() {
        return expiration;
    }

    public void setExpiration(Long expiration) {
        this.expiration = expiration;
    }

    public void setTokenType(String tokenType) {
        this.tokenType = tokenType;
    }
}
